<?php
mysql_connect(DBROOT,DBUSERNAME,DBPASSWORD);
mysql_query("SET NAMES UTF8");
mysql_select_db(DBNAME);
function query_schedule($userid){	
	$query="select distinct schedule.LESSONINDEX,schedule.LESSONNAME,schedule.STARTWEEK,schedule.ENDWEEK from schedule where schedule.userid=$userid order by LESSONINDEX ASC";
	$result=mysql_query($query);
	return $result;
}
?>